/*******************************************************************************
 Configuration Information:
 Repository: Integrity Source
 Name      : $RCSfile: AR_CD_RackVDmd.c $
 Version   : $Revision: 1.7 $
 Author    : $Author: Jack Jin (JinC5) $
 Date      : $Date: 2018/09/14 18:33:14IST $
 Location  : $ProjectName: /Steering/Projects/Geely/CMA_DP/PR48756_LVS_ENG_APP_Geely_CMA_EPS_DP_SYS_HRoom_AP/30_Software/3040_Design/S2-Application/01-Development/V00-Mainline/04-Components/ActiveReturn_Ear/Source/project.pj $
********************************************************************************

   ZF Friedrichshafen AG owns the copyright in this document and associated
   documents and all rights are reserved.  These documents must
   not be used for any purpose other than that for which they
   are supplied and must not be copied in whole or in part or
   disclosed to others without prior written consent of ZF Friedrichshafen AG.
   Any copy of this drawing or document made by any method
   must also include a copy of this legend.

   (C) ZF Friedrichshafen AG 2018

*******************************************************************************/
/**************************************************************************************************\
 *** 
 *** Simulink model       : AR_CD_RackVDmd_tl
 *** TargetLink subsystem : AR_CD_RackVDmd_tl
 *** Codefile             : AR_CD_RackVDmd.c
 ***
 *** Generated by TargetLink, the dSPACE production quality code generator
 *** Model version: 1.94
 *** Generation date: 2018-09-14 10:59:41
 ***
 *** CODE GENERATOR OPTIONS:
 *** Code generation mode                     : AUTOSAR
 *** AUTOSAR version                          : 4.2.2
 *** Compiler                                 : <unknown>
 *** Target                                   : Generic
 *** ANSI-C compatible code                   : yes
 *** Code Optimization                        : enabled
 *** Constant style                           : decimal
 *** Clean code option                        : enabled
 *** Logging mode                             : Do not log anything
 *** Code Coverage                            : disabled
 *** Generate empty conditional branches      : disabled
 *** Loop unroll threshold                    : 5
 *** Shift mode                               : automatic
 *** Handle unscaled SF expr. with TL type    : enabled
 *** Assignment of conditions                 : AllBooleanOutputs 
 *** Scope reduction only to function level   : disabled
 *** Exploit ranges if not erasable           : disabled
 *** Exploit Compute Through Overflow         : never
 *** Linker sections                          : enabled
 *** Enable Assembler                         : disabled
 *** Variable name length                     : unlimited
 *** Use global bitfields                     : disabled
 *** Stateflow: use of bitfields              : enabled
 *** State activity encoding limit            : 8
 *** Omit zero inits in restart function      : disabled
 *** Share functions between TL subsystems    : disabled
 *** Generate 64bit functions                 : disabled
 *** Inlining Threshold                       : 6
 *** Line break limit                         : 100
 *** Target optimized boolean data type       : enabled
 *** Keep saturation elements                 : disabled
 *** Extended variable sharing                : disabled
 *** Extended lifetime optimization           : enabled
 *** Style definition file                    : C:\Program Files\dSPACE TargetLink 4.2\Matlab\Tl\Con
 ***                                            fig\codegen\cconfig.xml
 *** Root style sheet                         : C:\Program Files\dSPACE TargetLink 4.2\Matlab\Tl\XML
 ***                                            \CodeGen\Stylesheets\TL_CSourceCodeSS.xsl
 ***
 *** SUBSYS                   CORRESPONDING SIMULINK SUBSYSTEM
 *** SAR_CD_031               AR_CD_RackVDmd_tl
 *** SAR_CD_032               AR_CD_RackVDmd_tl/AR_CD_RackVDmd
 *** SAR_CD_033               AR_CD_RackVDmd_tl/DocFunction
 *** SAR_CD_034               AR_CD_RackVDmd_tl/IncludeAppHeader
 *** SAR_CD_035               AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset
 *** SAR_CD_036               AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1
 *** SAR_CD_037               AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_SlewRateLimn_MB
 *** SAR_CD_038               AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_fabs1
 *** SAR_CD_039               AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_fabs2
 *** SAR_CD_0310              AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_SlewRateLimn_MB/SaturationDynamic
 *** SAR_CD_0311              AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_SlewRateLimn_MB/dsa_ConfLib_InitBlock
 *** SAR_CD_0312              AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_SlewRateLimn_MB/SaturationDynamic/input
 *** SAR_CD_0313              AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_SlewRateLimn_MB/SaturationDynamic/max
 *** SAR_CD_0314              AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDi
 ***                          vA_SlewRateLimn_MB/SaturationDynamic/min
 *** SAR_CD_0315              AR_CD_RackVDmd_tl/DocFunction/EmptySubsystem
 *** 
 *** SUBSYS                   CORRESPONDING MODEL BLOCK (REFERENCED MODEL)
 *** 
 *** SF-NODE   CORRESPONDING STATEFLOW NODE                           DESCRIPTION
 *** 
 *** TargetLink version      : 4.2p2 from 27-Nov-2017
 *** Code generator version  : Build Id 4.2.0.33 from 2017-11-28 14:39:24

\**************************************************************************************************/

#ifndef AR_CD_RACKVDMD_C
#define AR_CD_RACKVDMD_C

/*----------------------------------------------------------------------------*\
  DEFINES (OPT)
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  INCLUDES
\*----------------------------------------------------------------------------*/

#include "Rte_ActiveReturnSwc.h"
#include "AR_CD_RackVDmd_tl_lut.h"
#include "AR_CD_RackVDmd.h"

/*----------------------------------------------------------------------------*\
  ENUMS
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  DEFINES
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  TYPEDEFS
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  VARIABLES
\*----------------------------------------------------------------------------*/

/******************************************************************************\
   VC_STRUCT_InitAtDef: Used for global struct variables. Initialised at definition. Creates access 
   functions (get and set). | Width: N.A.
\******************************************************************************/
struct tAR_CD_RackVDmd_tag var_AR_CD_RackVDmd = {
   0, /* EarRackPosnIndex */
   0.F, /* EarRackPosnFraction */
   0.F, /* EarRackPosnCtrlErr */
   0, /* EarRackPosnCtrlErrSign */
   0.F /* PDCRackPosnOffset */
};

/* Custom code: AR_CD_RackVDmd_tl/IncludeAppHeader/CC_AppHeaderInclude << declaration code >> */
#include "Rte_ActiveReturnSwc.h"
/*----------------------------------------------------------------------------*\
  PARAMETERIZED MACROS
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  FUNCTION PROTOTYPES
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  INLINE FUNCTIONS
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  FUNCTION DEFINITIONS
\*----------------------------------------------------------------------------*/

/**************************************************************************************************\
 ***  FUNCTION:
 ***      AR_CD_RackVDmd
 *** 
 ***  DESCRIPTION:
 ***      
 *** 
 ***  PARAMETERS:
 ***      Type               Name                Description
 ***      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ***      mm                 ARBPDCRackPosnDmd   
 ***      Boolean            ARBPDCRackPosnVldFlg
 ***      mm                 RackAbsPosn         
 ***      mmPerSec           RackV               
 ***
 ***  RETURNS:
 ***      void
 ***
 ***  SETTINGS:
 ***
\**************************************************************************************************/
void AR_CD_RackVDmd(mm ARBPDCRackPosnDmd, Boolean ARBPDCRackPosnVldFlg, mm RackAbsPosn, mmPerSec
  RackV)
{
   /* SLLocal: Default storage class for local variables | Width: 32 */
   Float32 SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl;
   Float32 SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl1;
   Float32 SAR_CD_035_Product2;
   Float32 SAR_CD_035_Sum_Ramp_Rate;
   float32 SAR_CD_036_Switch;
   float32 SAR_CD_037_ZFDivA_SlewRateLimn_MB_c;
   float32 SAR_CD_037_ZFDivA_SlewRateLimn_MB_d;
   float32 SAR_CD_038_Switch;
   float32 SAR_CD_039_Switch;

   /* SLLocalInit: Default storage class for local variables with init value | Width: 32 */
   float32 SAR_CD_0310_Merge_Y;

   /* SLStaticLocalInit: Default storage class for static local variables with initvalue | Width: 32
    */
   static float32 X_SAR_CD_037_Unit_Delay = 0.F;

   /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_Ena
      ble_switchl
      AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_Enable_swit
      chl: Omitted comparison with constant. */
   if (ARBPDCRackPosnVldFlg) {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_
         Enable_switchl */
      SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl = ARBPDCRackPosnDmd;
   }
   else {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_
         Enable_switchl */
      SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl = 0.F;
   }

   /* Product: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/Product2 */
   SAR_CD_035_Product2 = RackV * Rte_CData_EAR_PDC_RACK_POSN_RAMP_GAIN();

   /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs2/Switch
      AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs2/Switch: Omitted
       comparison with constant.
      # combined # Relational: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFD
      ivA_fabs2/Relational Operator */
   if (SAR_CD_035_Product2 < 0.F) {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs2/Swit
         ch
         # combined # Gain: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA
         _fabs2/Gain */
      SAR_CD_039_Switch = SAR_CD_035_Product2 * -1.F;
   }
   else {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs2/Swit
         ch */
      SAR_CD_039_Switch = SAR_CD_035_Product2;
   }

   /* Sum: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/Sum_Ramp_Rate */
   SAR_CD_035_Sum_Ramp_Rate = Rte_CData_EAR_PDC_RACK_POSN_RAMP_RATE() + SAR_CD_039_Switch;

   /* Sum: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_SlewRateLimn_MB/
      Subtract */
   SAR_CD_037_ZFDivA_SlewRateLimn_MB_d = SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl -
    X_SAR_CD_037_Unit_Delay;

   /* Product: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_SlewRateLimn
      _MB/Divide1 */
   SAR_CD_037_ZFDivA_SlewRateLimn_MB_c = SAR_CD_035_Sum_Ramp_Rate * 0.001F;
   if (SAR_CD_037_ZFDivA_SlewRateLimn_MB_d > SAR_CD_037_ZFDivA_SlewRateLimn_MB_c) {
      /* Reference of merge block: Merge Y AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPo
         snOffset/ZFDivA_SlewRateLimn_MB/Saturation Dynamic/Merge Y
         update of variable(s) associated with AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRa
         ckPosnOffset/ZFDivA_SlewRateLimn_MB/Saturation
         Dynamic/max/Y
         # combined # Outport: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFD
         ivA_SlewRateLimn_MB/Saturation Dynamic/max/Y */
      SAR_CD_0310_Merge_Y = SAR_CD_037_ZFDivA_SlewRateLimn_MB_c;
   }
   else {
      /* SLLocal: Default storage class for local variables | Width: 32 */
      float32 SAR_CD_037_ZFDivA_SlewRateLimn_MB_b;

      /* Product: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_SlewRateL
         imn_MB/Divide
         # combined # Gain: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/Gain
       */
      SAR_CD_037_ZFDivA_SlewRateLimn_MB_b = 0.001F * (SAR_CD_035_Sum_Ramp_Rate * -1.F);
      if (SAR_CD_037_ZFDivA_SlewRateLimn_MB_d < SAR_CD_037_ZFDivA_SlewRateLimn_MB_b) {
         /* Reference of merge block: Merge Y AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRac
            kPosnOffset/ZFDivA_SlewRateLimn_MB/Saturation Dynamic/Merge Y
            update of variable(s) associated with AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PD
            CRackPosnOffset/ZFDivA_SlewRateLimn_MB/Saturation
            Dynamic/min/Y
            # combined # Outport: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/
            ZFDivA_SlewRateLimn_MB/Saturation Dynamic/min/Y */
         SAR_CD_0310_Merge_Y = SAR_CD_037_ZFDivA_SlewRateLimn_MB_b;
      }
      else {
         /* Reference of merge block: Merge Y AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRac
            kPosnOffset/ZFDivA_SlewRateLimn_MB/Saturation Dynamic/Merge Y
            update of variable(s) associated with AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PD
            CRackPosnOffset/ZFDivA_SlewRateLimn_MB/Saturation
            Dynamic/input/Y
            # combined # Outport: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/
            ZFDivA_SlewRateLimn_MB/Saturation Dynamic/input/Y */
         SAR_CD_0310_Merge_Y = SAR_CD_037_ZFDivA_SlewRateLimn_MB_d;
      }
   }

   /* Sum: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_SlewRateLimn_MB/
      Add
      # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFD
      ivA_SlewRateLimn_MB/Unit Delay */
   X_SAR_CD_037_Unit_Delay = SAR_CD_0310_Merge_Y + X_SAR_CD_037_Unit_Delay;

   /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs1/Switch
      AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs1/Switch: Omitted
       comparison with constant.
      # combined # Relational: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFD
      ivA_fabs1/Relational Operator
      # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFD
      ivA_SlewRateLimn_MB/Unit Delay */
   if (X_SAR_CD_037_Unit_Delay < 0.F) {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs1/Swit
         ch
         # combined # Gain: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA
         _fabs1/Gain
         # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/
         ZFDivA_SlewRateLimn_MB/Unit Delay */
      SAR_CD_038_Switch = X_SAR_CD_037_Unit_Delay * -1.F;
   }
   else {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/ZFDivA_fabs1/Swit
         ch
         # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/
         ZFDivA_SlewRateLimn_MB/Unit Delay */
      SAR_CD_038_Switch = X_SAR_CD_037_Unit_Delay;
   }

   /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_Ena
      ble_switchl1
      AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_Enable_swit
      chl1: Omitted comparison with constant.
      # combined # Relational: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/Rel
      ational Operator */
   if (SAR_CD_038_Switch <= Rte_CData_EAR_MAX_RACK_POSN_OFFSET()) {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_
         Enable_switchl1
         # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/
         ZFDivA_SlewRateLimn_MB/Unit Delay */
      SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl1 = X_SAR_CD_037_Unit_Delay;
   }
   else {
      /* SLLocal: Default storage class for local variables | Width: 16 */
      sint16 SAR_CD_035_Sign;

      /* Sign: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/Sign
         # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/
         ZFDivA_SlewRateLimn_MB/Unit Delay */
      if (X_SAR_CD_037_Unit_Delay < 0.F) {
         SAR_CD_035_Sign = -1;
      }
      else {
         /* # combined # Unit delay: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffs
            et/ZFDivA_SlewRateLimn_MB/Unit Delay */
         SAR_CD_035_Sign = (sint16) (X_SAR_CD_037_Unit_Delay > 0.F);
      }

      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/PDC_AvrgRackPosn_
         Enable_switchl1
         # combined # Product: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/AR_CD_RackVDmd_PDCRackPosnOffset/Sig
         n Product */
      SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl1 = Rte_CData_EAR_MAX_RACK_POSN_OFFSET() *
       ((float32) SAR_CD_035_Sign);
   }

   /* Sum: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/Add */
   var_AR_CD_RackVDmd.EarRackPosnCtrlErr = SAR_CD_035_PDC_AvrgRackPosn_Enable_switchl1 -
    RackAbsPosn;

   /* Sign: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/Sign */
   if (var_AR_CD_RackVDmd.EarRackPosnCtrlErr < 0.F) {
      /* # combined # TargetLink outport: AR_CD_RackVDmd_tl/EarRackPosnCtrlErrSign */
      var_AR_CD_RackVDmd.EarRackPosnCtrlErrSign = -1;
   }
   else {
      /* # combined # TargetLink outport: AR_CD_RackVDmd_tl/EarRackPosnCtrlErrSign */
      var_AR_CD_RackVDmd.EarRackPosnCtrlErrSign = (sint16) (var_AR_CD_RackVDmd.EarRackPosnCtrlErr >
       0.F);
   }

   /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1/Switch
      AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1/Switch: Omitted comparison with constant.
      # combined # Relational: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1/Relational Operator */
   if (var_AR_CD_RackVDmd.EarRackPosnCtrlErr < 0.F) {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1/Switch
         # combined # Gain: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1/Gain */
      SAR_CD_036_Switch = var_AR_CD_RackVDmd.EarRackPosnCtrlErr * -1.F;
   }
   else {
      /* Switch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/ZFDivA_fabs1/Switch */
      SAR_CD_036_Switch = var_AR_CD_RackVDmd.EarRackPosnCtrlErr;
   }

   /* IndexSearch: AR_CD_RackVDmd_tl/AR_CD_RackVDmd/Prelookup
      # combined # TargetLink outport: AR_CD_RackVDmd_tl/EarRackPosnIndex
      # combined # TargetLink outport: AR_CD_RackVDmd_tl/EarRackPosnFraction */
   TabIdxS48T3078_AR_CD_03((const float32 *) Rte_CData_EAR_RACK_POSN_BRKPTS(), 8, SAR_CD_036_Switch,
     &(var_AR_CD_RackVDmd.EarRackPosnIndex), &(var_AR_CD_RackVDmd.EarRackPosnFraction));
}

/*----------------------------------------------------------------------------*\
  MODULE LOCAL FUNCTION DEFINITIONS
\*----------------------------------------------------------------------------*/
#endif /* AR_CD_RACKVDMD_C */
/*----------------------------------------------------------------------------*\
  END OF FILE
\*----------------------------------------------------------------------------*/
